<template>
  <div class="shopDetails">
    <el-dialog :visible="dialogVisible" title="详情" width="80%" :before-close="btnCancel" @open="getDataList">
      <el-form :model="shopDetails">
        <el-row>
          <el-col :span="12">
            <el-form-item label="店铺名称:" label-width="80px">
              <el-input v-model="shopDetails.shop_name" disabled placeholder="请输入" size="small" style="width:260px" />
            </el-form-item>
            <el-form-item label="用户名称:" label-width="80px">
              <el-input v-model="shopDetails.username" placeholder="请输入" disabled size="small" style="width:260px" />
            </el-form-item>
            <el-form-item label="手机号码:" label-width="80px">
              <el-input v-model="shopDetails.mobile" placeholder="请输入" disabled size="small" style="width:260px" />
            </el-form-item>
            <el-form-item label="所属行业:" label-width="80px">
              <el-input v-model="shopDetails.industry_name" placeholder="请输入" disabled size="small" style="width:260px" />
            </el-form-item>
            <el-form-item label="身份证号:" label-width="80px">
              <el-input v-model="shopDetails.id_card" placeholder="请输入" disabled size="small" style="width:260px" />
            </el-form-item>
            <el-row class="businessHours">
              <el-col :span="10">
                <el-form-item label="营业时间:" label-width="80px">
                  <el-input placeholder="起始时间 ◴" size="small" style="width:100px" disabled />
                </el-form-item>
              </el-col>
              <el-col :span="5">
                <el-form-item>
                  <el-input placeholder="结束时间 ◴" size="small" style="width:100px" disabled />
                </el-form-item>
              </el-col>
            </el-row>
            <el-row class="businessHours">

              <el-form-item label="经营模式:" label-width="80px">
                <el-input v-model="shopDetails.bus_model" size="small" disabled style="width:260px" />
              </el-form-item>

            </el-row>
            <el-form-item label="主要产品:" label-width="80px"><upload-pictures /></el-form-item>
          </el-col>
          <el-col :span="12">
            <el-form-item label="店铺头像:" label-width="80px"><upload-pictures /></el-form-item>
            <el-form-item label="营业执照:" label-width="80px"><upload-pictures /></el-form-item>
            <el-form-item label="上传证件:" label-width="80px"><upload-pictures /></el-form-item>
            <el-form-item label="店铺实拍:" label-width="80px"><upload-pictures /></el-form-item>
            <el-row>
              <el-col :span="9">
                <el-form-item label="地址选点:" label-width="80px">
                  <el-input size="small" disabled placeholder="湖南省" />
                </el-form-item>
              </el-col>
              <el-col :span="6">
                <el-form-item label="" label-width="20px">
                  <el-input size="small" disabled placeholder="长沙市" />
                </el-form-item>
              </el-col>
              <el-col :span="9">
                <el-form-item label="" label-width="20px">
                  <el-input size="small" disabled placeholder="岳麓区" style="width:120px" />
                </el-form-item>
              </el-col>
            </el-row>
            <el-form-item label="详细地址:" label-width="80px">
              <el-input v-model="shopDetails.addr" size="small" disabled style="width:300px" />
            </el-form-item>
          </el-col>
        </el-row>
      </el-form>
      <el-row slot="footer" class="dialog-footer" type="flex" justify="center">
        <el-button type="danger" @click="btnCancel">审核失败</el-button>
        <el-button type="success" @click="btnOk">审核通过</el-button>
      </el-row>
    </el-dialog>

  </div>
</template>
<script>
import uploadPictures from './uploadPictures'
import { shenhe } from '@/api/table'
export default {
  components: {
    uploadPictures
  },
  props: {
    dialogVisible: {
      type: Boolean,
      default: false
    }
  },
  data() {
    return {
      shopDetails: {
        shop_name: '',
        username: '',
        mobile: '',
        industry_name: '',
        id_card: '',
        bus_model: ''

      }
    }
  },
  methods: {
    btnOk() {
      this.$parent.dialogVisible = false
      this.shopDetails.approval_sts = 'passed'
      shenhe(this.shopDetails)
      this.$message.success('审核通过')
    },
    btnCancel() {
      this.$parent.dialogVisible = false
      this.shopDetails.approval_sts = 'rejected'
      console.log(this.shopDetails)
      shenhe(this.shopDetails)
      this.$message.error('审核不通过')
    },
    getDataList() {
      this.shopDetails = this.$parent.rowData
    }
  }
}
</script>
<style lang="scss" scoped>

</style>
